/**
 * 
 */
package com.hk.Mgr.web.controller.product;

import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hk.Mgr.web.message.StatusCode;
import com.hk.Mgr.web.message.cooperation.CompanyReq;
import com.hk.base.BaseCtrl;
import com.hk.base.ResponseBase;
import com.hk.commons.HqlFilter;
import com.hk.commons.entity.product.Company;
import com.hk.commons.entity.product.ProductParInfo;
import com.hk.service.product.ICompany;
import com.hk.service.product.IProductParInfo;

/**
 * @author psx 产品父标信息
 */
@Controller
@RequestMapping(value = BaseCtrl.MgrRootPath + "/proparCtrl")
public class ProductParCtrl extends BaseCtrl {

	@Autowired
	private IProductParInfo proparService;
	/**
	 * @Title: getProductInfoList
	 * @Description: 分页获取系统模块
	 * @param
	 */
	@ResponseBody
	@RequestMapping(value = "/list", method = RequestMethod.POST)
	public ResponseBase<List<ProductParInfo>> getAll() {
		ResponseBase<List<ProductParInfo>> resp = new ResponseBase<List<ProductParInfo>>();
		 
		List<ProductParInfo> proparList = proparService.getAll(); 
		try {
			resp.setSize(proparList.size());
			resp.setResultCode(StatusCode.SUCCESS.key());
			resp.setResult(proparList);

		} catch (Exception ex) {
			logger.error(ex.getMessage(), ex);
			resp.setMsg("操作异常，请重试");
			resp.setResultCode(StatusCode.EXCEPTION.key());
		}
		return resp;
	} 
}
